import http from "@/utils/http.js"

const url = {
    // 新增驾驶员
    addDriver: "/driver/addDriver",
    // 修改驾驶员
    updateDriver: "/driver/updateDriver",
    // 分页查询驾驶员
    pageList: "/driver/pageList",
    // 删除驾驶员
    deleteDriver: "/driver/deleteDriver/",
    // 查看该驾驶员转运记录
    transportRecord: "/driver/transportRecord",
}

export default {
    url: url,
    // 新增驾驶员
    addDriver(params) {
        return http.post(url.addDriver, params)
    },
    // 修改驾驶员
    updateDriver(params) {
        return http.post(url.updateDriver, params)
    },
    // 分页查询驾驶员
    pageList(params) {
        return http.post(url.pageList, params)
    },
    // 删除驾驶员
    deleteDriver(params) {
        return http.post(url.deleteDriver + params.id)
    },
    // 删除驾驶员
    transportRecord(params) {
        return http.post(url.transportRecord, params)
    },
}